<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery.min.js"></script>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: pink;
        }
        button{
            background-color: pink;
            width: 200px;
            height: 50px;
        }
        bg{
            background-color: red;
            width: 200px;
            height: 50px;
        }
    </style>
</head>
<body>

    <div>123156</div>
    <button>按钮</button>
    <script>
        /*jQuery 使用css方法来修改简单元素样式；也可以操作类，修改多个样式*/
        $(function(){
            //操作CSS
            $("div").css("background","red");
            //参数可以是对象形式，方便设置多组样式。属性名和属性值用冒号隔开
            $("div").css({"color":"white","font-size":"20px"});
            
        })

    </script>
</body>
</html>